<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #app {
            width: 600px;
            margin: 40px auto;

        }

        button {
            margin-top: 15px;
        }
    </style>

    <script src="/CHENG-ZAO-ZAO/js/vue.js"></script>
</head>

<body>
    <div id="app">
        <h2>信息统计</h2>
        <form>
            性别
            <label>
                <my-radio name="gender" value="0">男</my-radio>
                <my-radio name="gender" value="1">女</my-radio>
            </label>
            <div>
                <button>提交</button>
            </div>
        </form>
    </div>
    <br>
</body>
<script type="text/x-template" id="my-radio">
    <label>
        <input type="radio" :name="name" :value="value">
        <slot></slot>
    </label>

</script>
<script>
    Vue.component('my-radio',{
        template:'#my-radio',
        props:['name','value']
    })
    let vm = new Vue({
        el: "#app",
        
    })
</script>

</html>